#![allow(unused_imports, non_snake_case, non_camel_case_types)]
use super::windows::*;
use super::*;

#[repr(C)]
pub struct IDWriteFontCollectionVtbl {
	pub parent: IUnknownVtbl,
	pub GetFontFamilyCount: unsafe extern "system" fn(This: *mut IDWriteFontCollection) -> UINT32,
	pub GetFontFamily: unsafe extern "system" fn(This: *mut IDWriteFontCollection, index: UINT32, fontFamily: *mut *mut IDWriteFontFamily) -> HRESULT,
	pub FindFamilyName: unsafe extern "system" fn(This: *mut IDWriteFontCollection, familyName: *const WCHAR, index: *mut UINT32, exists: *mut BOOL) -> HRESULT,
	pub GetFontFromFontFace: unsafe extern "system" fn(This: *mut IDWriteFontCollection, fontFace: *mut IDWriteFontFace, font: *mut *mut IDWriteFont) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteFontCollection {
	pub lpVtbl: *const IDWriteFontCollectionVtbl,
}
impl IDWriteFontCollection {
	#[inline]
	pub unsafe fn GetFontFamilyCount(&self) -> UINT32 {
		((*self.lpVtbl).GetFontFamilyCount)(self as *const _ as *mut _)
	}
	#[inline]
	pub unsafe fn GetFontFamily(&self, index: UINT32, fontFamily: *mut *mut IDWriteFontFamily) -> HRESULT {
		((*self.lpVtbl).GetFontFamily)(self as *const _ as *mut _, index, fontFamily)
	}
	#[inline]
	pub unsafe fn FindFamilyName(&self, familyName: *const WCHAR, index: *mut UINT32, exists: *mut BOOL) -> HRESULT {
		((*self.lpVtbl).FindFamilyName)(self as *const _ as *mut _, familyName, index, exists)
	}
	#[inline]
	pub unsafe fn GetFontFromFontFace(&self, fontFace: *mut IDWriteFontFace, font: *mut *mut IDWriteFont) -> HRESULT {
		((*self.lpVtbl).GetFontFromFontFace)(self as *const _ as *mut _, fontFace, font)
	}
}
impl core::ops::Deref for IDWriteFontCollection {
	type Target = IUnknown;
	#[inline]
	fn deref(&self) -> &IUnknown {
		unsafe { &*(self as *const IDWriteFontCollection as *const IUnknown) }
	}
}
impl Interface for IDWriteFontCollection {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0xa84cee02, Data2: 0x3eea, Data3: 0x4eee, Data4: [0xa8, 0x27, 0x87, 0xc1, 0xa0, 0x2a, 0x0f, 0xcc] }
	}
}

#[repr(C)]
pub struct IDWriteFontCollectionLoaderVtbl {
	pub parent: IUnknownVtbl,
	pub CreateEnumeratorFromKey: unsafe extern "system" fn(This: *mut IDWriteFontCollectionLoader, factory: *mut IDWriteFactory, collectionKey: *const c_void, collectionKeySize: UINT32, fontFileEnumerator: *mut *mut IDWriteFontFileEnumerator) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteFontCollectionLoader {
	pub lpVtbl: *const IDWriteFontCollectionLoaderVtbl,
}
impl IDWriteFontCollectionLoader {
	#[inline]
	pub unsafe fn CreateEnumeratorFromKey(&self, factory: *mut IDWriteFactory, collectionKey: *const c_void, collectionKeySize: UINT32, fontFileEnumerator: *mut *mut IDWriteFontFileEnumerator) -> HRESULT {
		((*self.lpVtbl).CreateEnumeratorFromKey)(self as *const _ as *mut _, factory, collectionKey, collectionKeySize, fontFileEnumerator)
	}
}
impl core::ops::Deref for IDWriteFontCollectionLoader {
	type Target = IUnknown;
	#[inline]
	fn deref(&self) -> &IUnknown {
		unsafe { &*(self as *const IDWriteFontCollectionLoader as *const IUnknown) }
	}
}
impl Interface for IDWriteFontCollectionLoader {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0xcca920e4, Data2: 0x52f0, Data3: 0x492b, Data4: [0xbf, 0xa8, 0x29, 0xc7, 0x2e, 0xe0, 0xa4, 0x68] }
	}
}
